//
//  BaseDetailViewController.m
//  Pianke
//
//  Created by BetaTheta on 16/1/22.
//  Copyright © 2016年 BetaTheta. All rights reserved.
//

#import "BaseDetailViewController.h"

@interface BaseDetailViewController ()
@property (nonatomic, retain) UIBarButtonItem *returnItem;
@property (nonatomic, retain) UIBarButtonItem *labelItem;
@end

@implementation BaseDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    // 背景颜色
    self.view.backgroundColor = [UIColor colorWithRed:242 / 256.0 green:234 / 256.0 blue: 218 / 256.0 alpha:1];
    
    // 导航栏按钮
    
    self.returnItem =  [[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icon_return.png"] style:UIBarButtonItemStylePlain target:self action:@selector(popAction)] autorelease];
    
    self.labelItem = [[[UIBarButtonItem alloc] initWithTitle:@"Label" style:UIBarButtonItemStylePlain target:self action:nil] autorelease];
    
    
    // 添加左按钮
    self.navigationItem.leftBarButtonItems = @[_returnItem,_labelItem];
    /**< item颜色 */
    self.navigationController.navigationBar.tintColor = [UIColor blackColor];
}
- (void)popAction
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
